#define DEBUG
#include <cstdio>

using namespace std;

const int maxn=2000;

long double max(long double a, long double b) {
  return a>b ? a : b;
}

int main() {
  freopen("vote.in", "r", stdin);
  freopen("vote.out", "w", stdout);

  long double p[maxn+1];
  int n, k;
  scanf("%d %d", &n, &k);
  for (int i=1; i<=n; i++) {
    scanf("%LF", p+i);
  }

  if (n==k) {
    static long double f[maxn+1];
    f[0] = 1;
    for (int i=1; i<=n; i++) {
      for (int j=k/2; j>=0; j--) {
	f[j] = (j>0 ? f[j-1]*p[i] : 0)+f[j]*(1-p[i]);
      }
    }
    printf("%.6LF", f[k/2]);
  } else {
    const int maxn=16;
    static long double f[1<<maxn][maxn+1];
    f[0][0] = 1;
    for (int i=1; i<=n; i++) {
      for (int s=0; s<(1<<(i-1)); s++) {
	int t=s|(1<<(i-1));
	for (int x=k/2; x>0; x--) {
	  f[t][x] = f[s][x-1]*p[i]+f[s][x]*(1-p[i]);
	}
	f[t][0] = f[s][0]*(1-p[i]);
      }
    }
    long double ans=0;
    for (int s=1; s<=(1<<n); s++) {
      int cnt=0;
      for (int i=0; i<n; i++) {
	cnt += (s>>i)&1;
      }
      if (cnt==k) {
	ans = max(ans, f[s][k/2]);
      }
    }
    printf("%.6LF", ans);
  }
  
  fclose(stdin);
  fclose(stdout);
  return 0;
}
